/**
 * 记录
 */

export function getPage(data){
	return new Promise((resolve, reject) => {  
		uni.request({
		  url: 'imgStore/imgRecord/page', 
		  method: 'GET', 
		  data: data,
		  success: (res) => {
			resolve(res.data)
		  },
		  fail: (err) => {
			reject(err);
		  }
		})
	})
}

export function addCollect(data){
	return new Promise((resolve, reject) => {  
		uni.request({
		  url: 'imgStore/imgRecord/addCollect', 
		  method: 'GET', 
		  data: data,
		  success: (res) => {
			resolve(res.data)
		  },
		  fail: (err) => {
			reject(err);
		  }
		})
	})
}

export function deleteByIds(data){
	 return new Promise((resolve, reject) => {  
		return uni.request({
		  url: 'imgStore/imgRecord/deleteByIds', 
		  method: 'post',
		  header: {
			  'Content-Type': 'application/x-www-form-urlencoded'  
		  },
		  dataType:'json',
		  data: data,
		  success: (res) => {
			resolve(res.data)
		  },
		  fail: (err) => {
			reject(err)
		  }
		});
	});
}


export function getCurUserDownLookCollTotal(data){
	return new Promise((resolve, reject) => {  
		uni.request({
		  url: 'imgStore/report/getCurUserDownLookCollTotal', 
		  method: 'GET', 
		  data: data,
		  success: (res) => {
			resolve(res.data)
		  },
		  fail: (err) => {
			reject(err);
		  }
		})
	})
}
